cmake_minimum_required(VERSION 3.20 FATAL_ERROR)

project(ExampleVK VERSION 1.0.0 LANGUAGES C CXX DESCRIPTION "一个Vulkan程序")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror=return-type")
  set(CMAKE_C_FLAGS "-Wall -Wextra -Werror=return-type")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror=return-type")
  set(CMAKE_C_FLAGS "-Wall -Wextra -Werror=return-type")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
  set(CMAKE_CXX_FLAGS "/W4 /utf-8 /EHsc")
  set(CMAKE_C_FLAGS "/W4 /utf-8")
  add_compile_options("/MP")
endif()

add_subdirectory(vendors)
add_subdirectory(tools)
add_subdirectory(src)
